use crate::biz_result::BizResult;
use crate::domain::entity::user::Model as EditorModel;
use crate::domain::form::user::CreateUserForm;
use crate::domain::param::user::CreateUserParam;
use crate::repository::UserRepository;

pub struct UserService {}

impl UserService {
    pub async fn member_register_by_phone_and_password(
        form: &CreateUserForm,
    ) -> BizResult<EditorModel> {
        let param: CreateUserParam = form.into();
        UserRepository::insert(&param).await
    }

    pub fn get_by_id(_id: i64) {}

    pub fn login_by_name(_name: String) {}

    pub fn paginate_query() {}

    pub fn list_query() {}

    pub fn register_by_name() {}

    pub fn update_info() {}

    pub fn update_password() {}

    pub fn toggle_status_by_id() {}

    pub fn toggle_status_all() {}

    pub fn auth() {}

    pub fn remove_by_id() {}

    pub fn remove_all() {}
}
